package aaa.question.mapper;

import aaa.question.domain.QuestionBank1;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper

public interface QuestionBank1Mapper {
    QuestionBank1 findByQuestionTypeAndQuestionIdJava(@Param("questionType") String questionType, @Param("questionJava") int questionJava);
    QuestionBank1 findByQuestionTypeAndQuestionIdC(@Param("questionType") String questionType, @Param("questionC") int questionC);
    QuestionBank1 findByQuestionTypeAndQuestionIdComputer(@Param("questionType") String questionType, @Param("questionComputer") int questionComputer);
    int findMaxJavaQuestionNumByQuestionType(@Param("questionType") String questionType);
    int findMaxCQuestionNumByQuestionType(@Param("questionType") String questionType);
    int findMaxComputerQuestionNumByQuestionType(@Param("questionType") String questionType);


    int findJavaIdByQuestionId(@Param("maxQuestionId") Integer maxQuestionId);

    int findCIdByQuestionId(@Param("maxQuestionId") Integer maxQuestionId);

    int findComputerIdByQuestionId(@Param("maxQuestionId") Integer maxQuestionId);

    int insertQuestionJava (@Param("questionText") String questionText, @Param("questionType") String questionType, @Param("correctAnswer") String correctAnswer,@Param("questionJava") int questionJava);

    int insertQuestionC (@Param("questionText") String questionText, @Param("questionType") String questionType, @Param("correctAnswer") String correctAnswer,@Param("questionC") int questionC);

    int insertQuestionComputer(@Param("questionText") String questionText, @Param("questionType") String questionType, @Param("correctAnswer") String correctAnswer, @Param("questionComputer") int questionComputer);

    int findIdByQuestionText (@Param("questionText") String questionText);

}